""" import sys
sys.path.append("d:\Python\Project\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-test-node")
from lib.container import Container
from lib.mysql.db import DB
from services.novel_service import NovelService

ret_obj = NovelService().list()
print(ret_obj)
Container.handle_end()

res = DB.table('sys_user').take(1).first()
print('aaaaaaaaaaa', res)
 """


def data_value_2_str(data):
    if isinstance(data, list):
        new_data = []
        for v in data:
            new_data.append(data_value_2_str(v))
        return new_data
    elif isinstance(data, dict):
        for k in data:
            v = data[k]
            data[k] = data_value_2_str(v)
        return data
    elif isinstance(data, str):
        return data
    elif not isinstance(data, str):
        return str(data)
    return data


data = [{"a": 1, "b": "aa", "c": 1.2}, {"a": 1, "b": "aa", "c": 1.2}]
print(data_value_2_str(data))
